package myschool.myshchool15.mystudent;

import java.util.Scanner;

public class IfSwitch {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);

        System.out.println("1.客户信息");
        System.out.println("2.客户查询");
        System.out.print("请输入你选择的数字：");
        //如果输入的是整型数字
        if (input.hasNextInt()) {
            int num = input.nextInt();
            switch (num) {
                case 1:
                    System.out.println("执行客服信息功能");
                    break;
                case 2:
                    System.out.println("执行客户查询功能");
                    break;

            }
        } else {
            System.out.println("请输入正确的数字！");


        }
    }
}
